project(AllegroStructure)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

file(GLOB SOURCES *.h *.cpp)

if (MSVC)
    file(GLOB PLATFORM_SOURCES msvc/*.h msvc/*.cpp)
else()
    file(GLOB PLATFORM_SOURCES standard/*.h standard/*.cpp)
endif()

add_library(${PROJECT_NAME} STATIC)

target_sources(${PROJECT_NAME} PRIVATE ${SOURCES} ${PLATFORM_SOURCES})

target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_LIST_DIR})
if (MSVC)
    target_include_directories(${PROJECT_NAME} PUBLIC msvc)
    target_compile_options(${PROJECT_NAME} PUBLIC "/Zc:__cplusplus")
else ()
    target_include_directories(${PROJECT_NAME} PUBLIC standard)
endif()
